package com.hqyj.system.service.impl;

import com.hqyj.system.mapper.UserRoleMapper;
import com.hqyj.system.model.UserRole;
import com.hqyj.system.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author cz
 * 2021/9/2 13:02
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleMapper userRoleMapper;

    @Override
    public int deleteUserRoleByUserId(int userId) {
        return userRoleMapper.deleteUserRoleByUserId(userId);
    }

    @Override
    public int addUserRoleByUserRole(UserRole userRole) {
        return userRoleMapper.insertSelective(userRole);
    }
}
